package cn.demoncat.util.io.entity;

import cn.demoncat.util.lang.entity.LineReadCallback;
import cn.demoncat.util.lang.entity.LineReadCallback.LineReadFinishException;

/**
 * 行警告输出流 - 通过callback.readWarn自定义输出方式
 * 
 * @author 延晓磊
 *
 * @since 2019年6月14日
 */
public class LineWarnOutputStream extends LineOutputStream {

	 
	public LineWarnOutputStream(LineReadCallback callback) {
		super(callback);
		this.callback = callback;
	}

	/**
	 * 行读取操作
	 * 
	 * @throws LineReadFinishException 
	 * 
	 */
	@Override
	public void read(String line) throws LineReadFinishException {
		callback.readWarn(line);
	}

}
